/*
 * Copyright (C) 2004-2006  Autodesk, Inc.
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of version 2.1 of the GNU Lesser
 * General Public License as published by the Free Software Foundation.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */
#ifndef FdoWcsOvCoverageDefinition_H
#define FdoWcsOvCoverageDefinition_H

#ifdef _WIN32
#pragma once
#endif //_WIN32

#include <WCS/FdoWcsOvProvider.h>
#include "WCS/Override/FdoWcsOvBoundingBoxDefinition.h"

/// \brief
///  
/// The FdoWcsOvCoverageDefinition class represents a WCS Layer defined on a WCS Server. 
/// A request to render a Map through WCS will allow mutliple layers to be specified 
/// in order to form a composite image. 
class FdoWcsOvCoverageDefinition : public FdoPhysicalElementMapping
{
    typedef FdoPhysicalElementMapping BaseType;

public:
    /// \brief
    /// Constructs a new empty layer definition.
    /// 
    /// \return
    /// Returns the newly created FdoWcsOvCoverageDefinition instance.
    /// 
    FDOWCS_API static FdoWcsOvCoverageDefinition* Create();

    FDOWCS_API FdoString* GetIdentifier(void) const;

    FDOWCS_API void SetIdentifier(FdoString* identifier);

    /// \brief
    /// Gets the WCS image format that will be used to a WCS 
    /// coverage.
    /// 
    /// \remarks
    /// 
    /// \return
    /// Returns the imageFormat definition.
    /// 
    FDOWCS_API FdoString* GetImageFormat(void) const;

    /// \brief
    /// Sets the WCS image format that will be used to a WCS 
    /// coverage.
    /// 
    /// \remarks
    /// 
    /// \return
    /// Returns nothing.
    /// 
    FDOWCS_API void SetImageFormat(FdoString* imageFormat);

    FDOWCS_API FdoWcsOvBoundingBoxDefinition* GetBoundingBox(void) const;

    FDOWCS_API void SetBoundingBox(FdoWcsOvBoundingBoxDefinition* bBox);

/// \cond DOXYGEN-IGNORE

    /// XML Serialization functions, not part of supported API.
    FDOWCS_API virtual void InitFromXml(FdoXmlSaxContext* pContext, FdoXmlAttributeCollection* attrs);
    FDOWCS_API virtual FdoXmlSaxHandler* XmlStartElement(
        FdoXmlSaxContext* context, 
        FdoString* uri, 
        FdoString* name, 
        FdoString* qname, 
        FdoXmlAttributeCollection* atts
    );
    FDOWCS_API virtual FdoBoolean XmlEndElement(FdoXmlSaxContext* context, FdoString* uri, FdoString* name, FdoString* qname);
    FDOWCS_API void _writeXml( FdoXmlWriter* xmlWriter, const FdoXmlFlags* flags );

    /// \brief
    /// Gets the fully qualified name of this element
    /// 
    /// \return
    /// Returns the qualified element name
    /// 
    FDOWCS_API virtual FdoStringP GetQualifiedName();

protected:
    FDOWCS_API FdoWcsOvCoverageDefinition(void);
    FDOWCS_API virtual ~FdoWcsOvCoverageDefinition(void);
    void Dispose(void);

private:
    FdoXmlCharDataHandler *m_pXmlContentHandler;
    FdoStringP m_format;
    FdoStringP m_identifier;
    FdoWcsOvBoundingBoxDefinitionP m_bBox;

/// \endcond

};

/// \brief
///  FdoWcsOvCoverageDefinitionP is a FdoPtr on FdoWcsOvCoverageDefinition, provided for convenience. 
typedef FdoPtr<FdoWcsOvCoverageDefinition> FdoWcsOvCoverageDefinitionP;

#endif


